<?php
class smarty_ext_comment {

	function smarty_ext_comment() {
		global $setupdata, $mysqlclass, $commentclass;
		$this->setupdata=$setupdata;
		$this->mysqlclass=$mysqlclass;
		$this->commentclass=$commentclass;
	}
	
	function get_comment_by_parent_id_and_type($params){
		if (isset($params['parent']) && isset($params['type'])) return $this->commentclass->get_comments($params['parent'], $params['type']);
		else return array();
	}
	
	function get_all_comments($params){
		return $this->commentclass->get_all_comments();
	}
		
	function get_all_pages($params){
		return $this->commentclass->get_all_pages();
	}
	
	function get_all_elements_by_page_id($params){
		if (isset($params['page'])) return $this->commentclass->get_all_elements_by_page_id($params['page']);
		else return array();
	}
	
	function get_comments_by_page_id_parent_id_and_parent_type($params){
		if (isset($params['parent']) && isset($params['type'])) return $this->commentclass->get_comments_by_page_id_parent_id_and_parent_type($params['parent'], $params['type']);
		else return array();
	}
}
?>